<!--{include header}-->
<script type="text/javascript" src="/static/js/kindeditor-all/kindeditor-all-min.js" ></script>
<script>
KindEditor.ready(function(K) {
  for (var i=0;i<6;i++)
  {
	K.create('#forum-new-content'+i, {
		allowFileManager : true
	});
  }
});
</script>

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="forum">
	
    <div id="content" class="coupons-box clear">
		<div class="box clear">
            <div class="box-content">
                <div class="head">
                <div class="dashboard" id="dashboard">
		<ul>${current_forum(null)}</ul>
	</div>

				</div>
                <div class="sect" style="margin-top:20px;">
                 <div style=" height:30px;display:block; ">
                        <h2 style=" float:left; padding-left:10px; width:600px; font-size:18px; font-weight:bold; font-family:'Microsoft Yahei';">${htmlspecialchars($topic['title'])}</h2>
                       
                    </div>
				<table id="replies-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table">
					<tr>
					<td width="48" valign="top"><div class="avatar"><img src="${user_image($users[$topic['user_id']]['avatar'])}" width="48" height="48" /></div></td>
					<td width="860" style="border-bottom:1px solid #e3e3e3;">
						<div class="author">
                        <b style="color:#F60;">{$users[$topic['user_id']]['username']}<i style="font-style:normal;font-weight:normal;padding-left:10px;">[&nbsp;楼主&nbsp;]</i></b>
							<span style="margin-left:15px; color:#a2a2a2; float: right;">发布于${Utility::HumanTime($topic['create_time'])}<!--{if is_manager()}-->&nbsp;<a href="/ajax/topic.php?action=topicremove&id={$topic['id']}" class="ajaxlink" ask="确定删除本话题吗？" style="font-size:12px; padding:2px; border:#CCC 1px solid; color:#333;">－删除</a><!--{/if}--></span><div class="clear"></div>
						</div>
						<div class="topic-content">
							${nl2br($topic['content'])}
						</div>
					</td>
					</tr>
					<!--{loop $replies $one}-->
					<tr>
					<td width="48" valign="top">
						<div class="avatar"><img src="${user_image($users[$one['user_id']]['avatar'])}" width="48" height="48" /></div>
					</td>
					<td width="660" style="border-bottom:1px solid #e3e3e3;">
						<div class="author">
                        <b>{$users[$one['user_id']]['username']}<i style="font-style:normal; font-weight:normal; padding-left:10px; color:#a2a2a2">[&nbsp;跟帖&nbsp;]</i></b>
							<span style="margin-left:15px;color:#a2a2a2;float: right;">发布于${Utility::HumanTime($one['create_time'])}<!--{if is_manager()}-->&nbsp;<a href="/ajax/topic.php?action=topicremove&id={$one['id']}" class="ajaxlink" ask="确定删除本回复吗？"style="font-size:12px; padding:2px; border:#CCC 1px solid; color:#333;">－删除</a><!--{/if}--></span><div class="clear"></div>
						</div>
						<div class="topic-content">
							${nl2br($one['content'])}
						</div>
					</td>
					</tr>
					<!--{/loop}-->
					<tr><td colspan="2" style="text-align:center;"></td></tr>
				</table>	
				<div style=" text-align:center; margin-top:10px;"><div class="page">{$pagestring}</div></div>
				</div>
				<div class="head" id="reply">
					<h2>我要回复</h2>
				</div>
				<div class="sect consult-form">
					<!--{if is_login()}-->
                    <form id="forum-reply-form" method="post" action="/forum/topic.php?id={$topic['id']}" class="validator">
					<input type="hidden" name="parent_id" value="{$topic['id']}" />
					<textarea style="width:700px;height:140px;" name="content" id="forum-new-content1" class="f-textarea" require="true" datatype="require"></textarea>
					<p class="commit"><input type="submit" value="发布" name="commit" id="leader-submit" class="formbutton"/></p>
					</form>
					<!--{else}-->
					请先<a href="/account/login.php">登录</a>或<a href="/account/signup.php">注册</a>再提问
					<!--{/if}-->
					<div class="clear"></div>
				</div>
            </div>
        </div>
    </div>


</div>

</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include footer}-->
